﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Employee.Master" AutoEventWireup="true" CodeBehind="ManageProduct.aspx.cs" Inherits="EnglishAuction.ManageProduct" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="Form1" runat="server">
        <br />
        <div style="border: solid 1px; background-color: #FFF; border-radius: 5px; border-color: #CCCCCC; width: 100%;">
            <div style="font-size: 20px; padding: 10px;">
                Duyệt sản phẩm
            </div>
            <hr style="border-style: inset; border-width: 1px; width: 98%;" />
            <table style="width: 100%;">
                <tr>
                    <td style="text-align: left; font-weight:bold; padding-left:50px;">
                        Loại sản phẩm: &nbsp;<asp:DropDownList ID="cbbLoaiSanPham" runat="server" CssClass="dropdown" OnSelectedIndexChanged="cbbLoaiSanPham_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <br />
                        <div style="overflow: auto; width: 1000px; margin: 0 auto;">
                            <asp:GridView ID="gvQuanLySanPham" runat="server"
                                AutoGenerateColumns="False"
                                CellPadding="4"
                                OnPageIndexChanging="gvQuanLySanPham_PageIndexChanging"
                                OnRowDataBound="gvQuanLySanPham_RowDataBound"
                                AllowPaging="True"
                                OnRowCommand="gvQuanLySanPham_RowCommand"
                                HeaderStyle-BackColor="#eeeeee"
                                Style="border: 1px solid #D8D8D8; background-color: #ffffff;"
                                Width="100%" PageSize="20">
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                <Columns>
                                    <asp:TemplateField HeaderText="STT" ItemStyle-Width="30" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                        <ItemTemplate>
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="TenSanPham" HeaderText="Tên sản phẩm"></asp:BoundField>
                                    <asp:BoundField DataField="GiaSan" DataFormatString="{0:###,###} (VNĐ)" HeaderText="Giá Sàn" ItemStyle-HorizontalAlign="Right">
                                        <HeaderStyle Width="120px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ThoiGianDauGia" HeaderText="Thời gian đấu" DataFormatString="{0} ngày">
                                        <HeaderStyle Width="100px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="NgayTao" DataFormatString="{0: dd/MM/yyyy}" HeaderText="Ngày đăng">
                                        <HeaderStyle Width="120px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Người đăng" SortExpression="Active" ItemStyle-Width="110">
                                        <ItemTemplate>
                                            <asp:Label ID="lbNguoiDung" runat="server" Text='<%# Eval("NguoiDungId")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:ImageField DataImageUrlField="HinhAnh" DataImageUrlFormatString="~/images/{0}" HeaderText="Hình ảnh" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                                        <ControlStyle Height="50px" Width="50px" />
                                        <HeaderStyle Width="70px" />
                                    </asp:ImageField>
                                    <asp:TemplateField>
                                        <ItemTemplate>
                                            <!--<asp:ImageButton ImageUrl="~/images/edit_icon.png" Width="20" Height="20" ID="btnEdit" Text="Cập nhật" CommandName="EditProduct" CausesValidation="False" CommandArgument='<%# Eval("Id") %>' runat="server"></asp:ImageButton>&nbsp;
                                            <asp:ImageButton ImageUrl="~/images/delete_icon.png" Width="20" Height="20" ID="btnDelete" Text="Xóa" CommandName="DeleteProduct" CausesValidation="false" CommandArgument='<%#Eval("Id")%>' runat="server"></asp:ImageButton>&nbsp;-->
                                            <asp:ImageButton ImageUrl="~/images/options-icon.png" Width="20" ToolTip="Duyệt" Height="20" ID="ImageButton1" Text="Duyệt" CommandName="OptionProduct" CausesValidation="false" CommandArgument='<%#Eval("Id")%>' runat="server"></asp:ImageButton>
                                            <!--<asp:ImageButton ImageUrl="~/images/Accept.png" Width="20" Height="20" ID="btnDuyet" Text="Duyệt" CommandName="AcceptProduct" CausesValidation="false" CommandArgument='<%#Eval("Id")%>' runat="server"></asp:ImageButton>-->
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="100px" HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                </Columns>
                                <PagerStyle BackColor="#eeeeee" ForeColor="White" HorizontalAlign="Center" />
                                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                            </asp:GridView>
                        </div>
                    </td>
                </tr>
            </table>
            <br />
        </div>
    </form>
    <br />
</asp:Content>
